<?php
/**
 *
 * Complexity WordPress Theme
 * Archives
 *
 * This file displays archive pages, which
 * includes pages for displaying a particular
 * tag, category, archive date, etc.
 *
 * @author  Jason Bobich
 *
 */
?>
<?php get_header(); ?>

<!-- PRIMARY CONTENT (start) -->
		
<div id="primary">

    <?php if($themeblvd_sidebar == 'left') : ?>
    	<?php get_sidebar(); ?>
    <?php endif; ?>

    <div id="content">
        <div class="pad">
			
			<?php themeblvd_breadcrumbs(); ?>
			
            <h2 class="page-title">
				<?php if (have_posts()) : ?>
					<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
					<?php /* If this is a category archive */ if (is_category()) { ?>
					<?php _e('Category', "themeblvd"); ?>: <?php single_cat_title(); ?>
					<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
					<?php _e('Tag', "themeblvd"); ?>: <?php single_tag_title(); ?>
					<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
					<?php _e('Archive', "themeblvd"); ?>: <?php the_time('F jS, Y'); ?>
					<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
					<?php _e('Archive', "themeblvd"); ?>: <?php the_time('F, Y'); ?>
					<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
					<?php _e('Archive', "themeblvd"); ?>: <?php the_time('Y'); ?>
					<?php /* If this is an author archive */ } elseif (is_author()) { ?>
					<?php _e('Author Archive', "themeblvd"); ?>
					<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
					<?php _e('Blog Archives', "themeblvd"); ?>
					<?php } ?>
	    		<?php endif; ?>
            </h2>

            <?php if ( have_posts() ) : while (have_posts()) : the_post(); ?>

            <div class="entry">

                <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>

                <span class="author-box">
                    <span class="date"><?php _e('Posted on', 'themeblvd'); ?> <?php the_time('m/d/y'); ?> <?php _e("by", "themeblvd"); ?> <?php the_author(); ?></span>
                    <?php if( comments_open() ): ?>
                    <a href="<?php the_permalink(); ?>#comments-wrap" class="comments-link"><?php comments_number('No Comments', '1 Comment', '% Comments'); ?></a>
                    <?php endif; ?>
                </span>

                <div class="description">
					
                    <?php if ( has_post_thumbnail() ) : ?>
                        <?php if($themeblvd_blog_thumb == 'square') : ?>
                        	<?php the_post_thumbnail('blog', array('class' => 'pretty')); ?>
                        <?php else : ?>
                        	<?php the_post_thumbnail('blog-stretch', array('class' => 'pretty stretch')); ?>
                        <?php endif; ?>
                    <?php endif; ?>
                	
                	<?php if($themeblvd_blog_content == 'content') : ?>
                	
	                    <?php the_content(); ?>
	                    
					<?php else : ?>
						
						<?php the_excerpt(); ?>
	
	                    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="button">
	                    	<?php _e('Read more', 'themeblvd'); ?>
	                    </a>
	                    
					<?php endif;?>
                    
                </div><!-- .description (end) -->

                <div class="clear"></div>

            </div><!-- .entry (end) -->


            <?php endwhile; ?>

            <div class="clear"></div>

           <!-- Pagination -->
            <?php themeblvd_pagination(); ?>

            <?php else : ?>
                <p><?php _e("There are no posts to show.", "themblvd"); ?></p>
            <?php endif; ?>

        </div><!-- .pad (end) -->
    </div><!-- #content (end) -->

    <?php if($themeblvd_sidebar == 'right') : ?>
    	<?php get_sidebar(); ?>
    <?php endif; ?>

<?php get_footer(); ?>